/*  1:   */ package com.rinsi.app.jczl.kjxx.tzry;
/*  2:   */ 
/*  3:   */ import com.rinsi.core.service.CoreSimpleService;
/*  4:   */ import com.rinsi.util.MapUtil;
/*  5:   */ import java.util.HashMap;
/*  6:   */ import java.util.Map;
/*  7:   */ import org.mybatis.spring.SqlSessionTemplate;
/*  8:   */ import org.springframework.stereotype.Service;
/*  9:   */ 
/* 10:   */ @Service
/* 11:   */ public class TzryService
/* 12:   */   extends CoreSimpleService
/* 13:   */ {
/* 14:   */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap)
/* 15:   */   {
/* 16:18 */     rMap.put("jsxzs", getSqlSessionTemplate().selectList("Core.getCodeList", Integer.valueOf(400008)));
/* 17:   */   }
/* 18:   */   
/* 19:   */   public void uploadImage(String id, byte[] image)
/* 20:   */   {
/* 21:24 */     Map<String, Object> params = new HashMap();
/* 22:   */     
/* 23:26 */     params.put("TZZYRY_ID", id);
/* 24:   */     
/* 25:28 */     params.put("TZZYRY_ZP", image);
/* 26:   */     
/* 27:30 */     getSqlSessionTemplate().update("jczl/kjxx/tzry.update", params);
/* 28:   */   }
/* 29:   */   
/* 30:   */   public Map<String, Object> importDatas(Map<String, Object> model)
/* 31:   */   {
/* 32:43 */     Map<String, Object> rMap = getRMap();
/* 33:   */     try
/* 34:   */     {
/* 35:47 */       getSqlSessionTemplate().insert("jczl/kjxx/tzry.importDatas", model);
/* 36:   */       
/* 37:49 */       rMap.put("success", Boolean.valueOf(true));
/* 38:   */     }
/* 39:   */     catch (Exception ex)
/* 40:   */     {
/* 41:53 */       rMap.put("success", Boolean.valueOf(false));
/* 42:55 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/* 43:57 */         rMap.put("message", ex.getMessage());
/* 44:   */       } else {
/* 45:61 */         rMap.put("message", "保存数据出错！请稍后重试，或联系系统管理员！");
/* 46:   */       }
/* 47:64 */       rMap.put("ex", ex.getMessage());
/* 48:   */       
/* 49:66 */       ex.printStackTrace();
/* 50:   */     }
/* 51:69 */     return rMap;
/* 52:   */   }
/* 53:   */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.app.jczl.kjxx.tzry.TzryService
 * JD-Core Version:    0.7.0.1
 */